-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(platforms): add generation for platform files #161
base: main
Are you sure you want to change the base?
Conversation
I'm more than willing to implement all the steps listed above, but I would first like to get this approved, before I take the time to implement the rest. |
I am in support of this PR, I think it would make updating the color palate much easier and help keep thing in sync. It would also make vetting new extras faster (no more checking hex codes). I think the simplest approach for CI would be to just add the generation to the If I remember right, we used to have color conversion stuff in Edit: It looks like we still have some of them. I am not near a device with a working nvim config, but something like this should work: local U = require("nordic.utils")
local r, g, b = U.hex_to_rgb(hex)
return string.format("%d,%d,%d", r, g, b) I would define that function in the individual themes, because I doubt we will find What do you think @AlexvZyl? |
This is based heavily off of the tokyonight extras-generation system. Co-authored-by: Owen Friedman <[email protected]>
Also adjust their doc strings slightly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks great!
I have ported Tokonights extra-generation system to work for nordic.nvim.
I have adjusted the code to make it more well suited for nordic.nvim, mainly simplifying it, since nordic.nvim doesn't have mutliple flavors, but reversing this to work for multiple flavors in the future wouldn't be a significant challange.
Why?
This would allow for easier creation of additional platforms, as well as help reduce inconsistencies between the different handwritten themes.
To-Do:
The one problem currently is that we would need to find a way to convert the hex color values to work for
iTerm2
andKonsole
since they use other formats.However, I don't think this will be a significant blocker.
iTerm2
andKonsole
/platforms
on each addition / change of one of the template filesNote on Licensing
Since Tokyonight is licensed under Apache License 2.0 we need to make sure we are in compliance with their License. I have added a note to the top of
platforms/init.lua
, but I am not sure if this is all that we require.It might be a good idea to add a
NOTICE
file.